#include "BotFloorSaw.h"
#include "DestroyEntityMessage.h"
#include "MessageSystem.h"

BotFloorSaw::BotFloorSaw(void)
{
	HzType = HZ_SAW;

	image.top = 0;
	image.left = image.bottom = 32;
	image.right = 64;

	lifeTime = 1;
	deathTimer = 0;
}


BotFloorSaw::~BotFloorSaw(void)
{
}

void BotFloorSaw::Update(float elapsedTime)
{
	FloorSaw::Update(elapsedTime);

	deathTimer += elapsedTime;

	if(deathTimer >= lifeTime)
	{
		DestroyEntityMessage* msg = new DestroyEntityMessage(this);
		MessageSystem::GetInstance()->SendMsg(msg);
		msg = nullptr;
	}
}
